package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

/*
1)BufferedInputStream:缓冲输入流
2)BufferedOutputStream：缓冲输出流
*/
public class FlushDemo {
    public static void main(String[] args) throws IOException {
        File file=new File("bos.txt");
        FileOutputStream fos=new FileOutputStream(file);
        BufferedOutputStream bos=new BufferedOutputStream(fos);
        String ling="哈哈哈哈哈哈";
        bos.write(ling.getBytes(StandardCharsets.UTF_8));
        System.out.println("ok");
        bos.close();
    }
}
